<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>质量追溯</title>
    <base href="${request.contextPath}/" />
    <link href="/css/News.css" rel="stylesheet"  type="text/css">
    <link href="/css/reset.css" rel="stylesheet"  type="text/css">
    <!--banner js-->
    <script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/js/myJS.js"></script>
    <script type="text/javascript" src="/js/jquery.js"></script>
    <script type="text/javascript" src="/js/skdslider.min.js"></script>
    <link rel="stylesheet" href="/css/jquery.pagination.css" />
    <link rel="stylesheet" href="/css/list.css">
    <!--end banner js-->
</head>
<body>
<!--top-->
<div class="header">
    <div id="header"></div>
</div>
<!--banner-->
<div class="banner_tongYong">
    <div class="banner_tongYong_box">
        <div class="i_con_title">
            <h2 class="en_titlestyle1" style="color: #fff"><span class="bold">News</span> Center</h2>
            <h2 class="cn_titlestyle1">新闻中心</h2>
            <hr class="hrstyle1">
        </div>
    </div>
</div>


<!--news-->
<div class="news">
    <div class="news_box">
    </div>
    <div class="fenye">
        <div class="box">
            <div id="pagination3" class="page fl"></div>
            <!--<div class="info fl">-->
            <!--<p>当前页数：<span id="current3">4</span></p>-->
            <!--</div>-->
        </div>
    </div>
</div>

<!--footer-->
<footer>
    <!--<p>黑龙江省农业委员会 &nbsp;&nbsp;中国联合网络通信集团有限公司黑龙江省分公司共同建设 &nbsp;&nbsp;哈尔滨凌之迅网络信息技术股份有限公司技术支持 &nbsp;&nbsp;黑ICP备12004997号-3 &nbsp;&nbsp;合作咨询热线：0451-86508885</p>-->
    <#include '/common/footer.html' />
</footer>
<script>
    $(function () {
        $(header).load("/common/top.html?type=新闻公告");
    });
</script>
</body>
<script src="/js/jquery.min.js"></script>
<script src="/js/jquery.pagination.min.js"></script>
<script>
    var count = "${count}";
    // 分页
    $(function() {
        var pagination = "{'page': '1','rows': '5','sord': 'desc','sidx': 'create_time'}";
        function createPagination(container){
            console.log(count);
            init(pagination);
            var options = {
                coping:true,    //首页和尾页
                homePage:'首页',
                endPage:'末页',
                prevContent:'上页',
                nextContent:'下页',
                showData:5,    //每页数据条数
                totalPage:Math.ceil(count / 5), //页数
                callback:function(api){
                    pagination = "{'page': '" + $("#pagination3").pagination("getPage").current + "','rows': '5','sord': 'desc','sidx': 'create_time'}";
                    init(pagination);
                }
            };
            $("#"+container).pagination(options);
        }
        function init(pagination){
            $.getJSON('/listDoType.html?newsType=${newsType!}',{'pagination':pagination},function(json){
                console.log(json);
                console.log(json.rows);
                var container =$('.news_box');
                var dataHtml="" ;
                $.each(json.rows, function(index, obj){
                    dataHtml +=
                        '<div class="news_box_01 clearfix">'
                        +'<a href="'
                        +'/PressReleasebaoguangtai/NewExposureStage_details/'+ obj.newsId
                        +'">'
                        +'<div class="news_box_01_l">'
                    if(obj.urlsPath != null && obj.urlsPath.length != 0){
                        dataHtml += '<img src="/'+obj.urlsPath+'">'
                    }else{
                        dataHtml += '<img src="images/new_02.jpg"></span>'
                    }
                    dataHtml +='</div>'
                        + '<div class="news_box_01_r">'
                        +'<div class="news_box_01_r_up clearfix">'
                        +'<h4>'
                        +obj.newsTitle
                        +'</h4>'
                        +'<span>'
                        +obj.createTime.substring(0,10)
                        +'</span>'
                        +'</div>'
                        +'<p>'
                    if(obj.content != null && obj.content.length >= 120){
                        dataHtml +='<p>'+obj.content.substring(0,120)+'.&nbsp;&nbsp;.&nbsp;&nbsp;.&nbsp;&nbsp;'
                    }
                    else{
                        dataHtml +=''+obj.content+' </p>'
                    }
                    dataHtml +='</div>'
                        + '</a>'
                        +'</div>';

                });
                container.html(dataHtml);
            });
        }
        createPagination("pagination3")
    });
</script>
</html>
































